package com.situ.blog.controller;

import com.situ.blog.service.IBlogService;
import com.situ.blog.util.JSONResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/chart")
public class ChartController {
    @Autowired
    private IBlogService blogService;

    @RequestMapping("/getChartPage")
    public String getChartPage() {
        return "/WEB-INF/chart.jsp";
    }

    @RequestMapping("/selectBlogCount")
    @ResponseBody
    public JSONResult selectBlogCount() {
        return blogService.selectBlogCount();
    }
}
